package com.gmrz.webauthn.protocol.v1.schema;


import java.util.Locale;

public class ACKI {
    private String acki;

    public ACKI(String acki) {
        if (acki == null) {
            throw new IllegalArgumentException("Null value provided for acki.");
        } else if (acki.length() == 0) {
            throw new IllegalArgumentException("Unexpected size for ACKI : " + acki.length());
        } else {
            this.acki = acki.toLowerCase(Locale.ENGLISH);
        }
    }

    public String toString() {
        return this.acki;
    }

    public int hashCode() {
        int result = 31 * 1 + (this.acki == null ? 0 : this.acki.hashCode());
        return result;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        } else if (obj == null) {
            return false;
        } else if (this.getClass() != obj.getClass()) {
            return false;
        } else {
            ACKI other = (ACKI)obj;
            if (this.acki == null) {
                if (other.acki != null) {
                    return false;
                }
            } else if (!this.acki.equals(other.acki)) {
                return false;
            }

            return true;
        }
    }
}

